#include "LayoutPage.h"  
namespace MircoUi{ 
    class StringItem: public vItem{
        const char *chr;//要显示的ASCII字符串   
    public: 
        virtual sVec2 draw(sVec2 ap); 
        void setData(const char* str);
    };   

    class NumItem: public vItem{
    private:
        int32 data; //上次显示的数字
    public:
        const char *format;
        uint8 num_len; //允许的数字长度
    public:
        virtual sVec2 draw(sVec2 ap); 
        void initData(const char* str, uint8 len);
        int32 getData(){
            return data;
        }
        void setData(int32 value) {
            data = value;
            changed();
        }
    };
    class ImageItem: public vItem{
    private:
        uint8 *image;
        sVec2 size; //图像的大小
    public:
        const char *format;
        uint8 num_len; //允许的数字长度
    public:
        virtual sVec2 draw(sVec2 ap);     
        void setData( uint8 *image, uint16 width, uint16 height) {
            this->image = image;
            this->size.x = width;
            this->size.y = height;
            changed();
        }
    };
}

